<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title></title>
		<meta name="generator" content="editplus">
		<meta name="author" content="">
		<meta name="keywords" content="">
		<meta name="description" content="">
		<link href="../css/mod.css" rel="stylesheet" type="text/css" />

		<script language="javascript">
			<!--

			var $ = function (id){
				return typeof id=="string" ? document.getElementById(id):id;
			}

			var dataset=function (obj){
				var value=obj.value;
				var num=obj.name.match(/\[([a-zA-Z0-9_\-]+)\]/)[1]
				var type={
					text:function (){

						return  '&nbsp;&nbsp;样式: <input type="text" name="structure['+num+'][css]" style="width:100px;" />&nbsp;&nbsp;js: <input type="text" name="structure['+num+'][js]" style="width:100px;" />&nbsp;&nbsp;<label for="idstructure['+num+'][fxian]">验证</label> <input type="checkbox" name="structure['+num+'][fxian]" id="idstructure['+num+'][fxian]" />';
					}(num),
					radio:function (){

						return '&nbsp;&nbsp;值对: <input type="text" name="structure['+num+'][method][jsonvalue]" style="width:100px;" />默认: <input type="text" name="structure['+num+'][method][dvalue]" style="width:50px;" />';
					}(num),
					checkbox:function (){
						return '值对: <input type="text" name="structure['+num+'][method][jsonvalue]" style="width:100px;" />默认: <input type="text" name="structure['+num+'][method][dvalue]" style="width:50px;" />';
					}(),
					select:function (){
						return '值对: <input type="text" name="structure['+num+'][method][jsonvalue]" style="width:100px;" />默认: <input type="text" name="structure['+num+'][method][dvalue]" style="width:50px;" />';
					}(),
					hide:function (){
						return '隐藏域';
					}(),
					my97:function (){
						return '<br />My97时间日期插件'+
						'| 您可以选择显示时间格式[<span style="color:red;">不可用中文</span>]'+
						'<input name="structure['+num+'][format]" type="text" value="yyyy-M-d H:mm:ss" style="width:150px;"/>'+
						'| php格式化'+
						'<input name="structure['+num+'][phpformat]" type="text" value="Y-m-d H:i:s" style="width:150px;"/>'+
						'<input type="hidden" name="structure['+num+'][plug]" value="d2t"/>';
					}(),
					md5str:function (){
						return '密码  验证:<input type="checkbox" name="structure['+num+'][method][yan]" value="1" style="width:100px;" />';
					}(),
					dselect:function (){
						return '&nbsp;&nbsp;表名：<input type="text" name="structure['+num+'][method][table]" style="width:100px;" />&nbsp;&nbsp;条件： <input type="text" name="structure['+num+'][method][condition]" style="width:100px;" />&nbsp;&nbsp;value: <input type="text" name="structure['+num+'][method][yvalue]" style="width:30px;" />&nbsp;&nbsp;text： <input type="text" name="structure['+num+'][method][xvalue]" style="width:30px;" />&nbsp;&nbsp;默认值： <input type="text" name="structure['+num+'][method][ydefault]"  style="width:30px;" />&nbsp;&nbsp;默认文字： <input type="text" name="structure['+num+'][method][xdefault]"  style="width:30px;" />';
					}(num),
					ubb:function (){
						return '默认ubb选项';
					}(num),
					bind:function (){
						return '&nbsp;&nbsp;模块id<input type="text" name="structure['+num+'][did]" style="width:100px;" />';
					}(num),
					textarea:function (){
						return '&nbsp;&nbsp;fparam: <input type="text" name="structure['+num+'][fparam]" style="width:100px;" />';
					}(num),
					fileupBic:function (){
						return '<label for="idstructure['+num+'][format][img]">图像</label><input type="checkbox" name="structure['+num+'][format][img]" id="idstructure['+num+'][format][img]" /><label for="idstructure['+num+'][format][sound]">,声音</label><input type="checkbox" name="structure['+num+'][format][sound]" id="idstructure['+num+'][format][sound]" /><label for="idstructure['+num+'][format][other]">,其它:</label><input type="text" name="structure['+num+'][format][other]" id="idstructure['+num+'][format][other]" style="width:100px;"  />路径 :<input type="text" name="structure['+num+'][path]" style="width:100px;"  />大小: <input type="text" name="structure['+num+'][filesize]" style="width:30px;" />';
					}(num),
					recommend:function (){
						return '推荐旗色: <input type="text" name="structure['+num+'][flag]"  style="width:80px;" />';
					}(num)
				}
				//for(x in type){
					//	if(x==value){
						//		return type[x];
						//	}else{
						//		continue;
						//	}
					//}
				return type[value];
			}
			//-->
		</script>

	</head>

	<body style="background:#D1DEF1;">
		<form method="post" enctype="multipart/form-data" action="dataset.php">

			<fieldset><legend>基表信息</legend>

				<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#B1CDE6"  style="border-collapse: collapse">
					<tr>
						<td height="30" width="8%" align="right" class="title"> 名称：</td>
						<td width="92%" height="30" align="left" class="con">
							<input type="text" name="title" value="<{$tableinfo.title}>"/>
						</td>
					</tr>

					<tr>
						<td height="30" width="8%" align="right" class="title"> 表名：</td>
						<td width="92%" height="30" align="left" class="con">
							<span style="color:red;"><{$tableinfo.name}></span>
						</td>
					</tr>

					<tr>
						<td height="30" width="8%" align="right" class="title"> 站点：</td>
						<td width="92%" height="30" align="left" class="con">
							<span style="color:red;"><{$tableinfo.web}></span>
						</td>
					</tr>

					<tr>
						<td height="30" width="8%" align="right" class="title"> 语言：</td>
						<td width="92%" height="30" align="left" class="con">
							<span style="color:red;"><{$tableinfo.lg}></span>
						</td>
					</tr>

					<tr>
						<td height="30" width="8%" align="right" class="title"> 权限：</td>
						<td width="92%" height="30" align="left" class="con">
							<label style="padding:0 10px;">屏蔽添加：<span style="color:red;"><input name="add" <{if $tableinfo.add}>checked<{/if}> type="checkbox" value="1"/></span></label>
							<label style="padding:0 10px;">屏蔽父级添加：<span style="color:red;"><input name="parent_add" checked type="checkbox" value="1"/></span></label>
							<label style="padding:0 10px;">屏蔽查看：<span style="color:red;"><input name="view" <{if $tableinfo.view}>checked<{/if}> type="checkbox" value="1"/></span></label>
							<label style="padding:0 10px;">屏蔽父级查看：<span style="color:red;"><input name="parent_view" checked type="checkbox" value="1"/></span></label>
							<label style="padding:0 10px;">屏蔽修改：<span style="color:red;"><input name="change" <{if $tableinfo.change}>checked<{/if}> type="checkbox" value="1"/></span></label>
							<label style="padding:0 10px;">屏蔽删除：<span style="color:red;"><input name="del" <{if $tableinfo.del}>checked<{/if}> type="checkbox" value="1"/></span></label>
						</td>
					</tr>

					<tr>
						<td height="30" width="8%" align="right" class="title"> DEBUG：</td>
						<td width="92%" height="30" align="left" class="con">
							<span style="color:red;"><input name="debug" <{if $tableinfo.debug}>checked<{/if}> type="checkbox" value="<{$tableinfo.debug}>"/></span>
						</td>
					</tr>

				</table>
				<!--基本信息 -->
				<input type="hidden" name="title" value="<{$tableinfo.title}>" />
				<input type="hidden" name="web" value="<{$tableinfo.web}>" />
				<input type="hidden" name="name" value="<{$tableinfo.name}>" />
				<input type="hidden" name="base" value="1" />
				<input type="hidden" name="rcfg" value="Z" />
				<input type="hidden" name="pageline" value="10" />
				<!--<input type="hidden" name="self" value="true" />-->
				<!--基本信息end -->

			</fieldset>
			<fieldset><legend>数据配置</legend>

				<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#B1CDE6"  style="border-collapse: collapse">

					<tr>
						<td height="30" width="8%" align="right" class="modtitle"> 模块名称：</td>
						<td width="92%" height="30" align="left" class="con">
							<input type="text" name="modtitle" value="<{$tableinfo.title}>"/>
						</td>
					</tr>
					<tr>
						<td height="30" width="8%" align="right" class="title">id&nbsp;&nbsp;</td>
						<td width="92%" height="30" align="left" class="con">
							名称:<input type="text" name="structure[id][COMMENT]" value="id" style="width:80px;" />
							&nbsp;&nbsp;
							类型：<select  name="structure[id][ftype]" style="width:100px;" onChange="$('spandivid'+this.name.match(/\[([a-z0-9]+)\]/)[1]).innerHTML=dataset(this);">
								<option disabled value=""></option>
								<option disabled value="text">文本</option>
								<option selected value="hide">隐藏域</option>
								<option disabled value="select">静态下拉</option>
								<option disabled value="dselect">动态下拉</option>
								<option disabled value="radio">单选</option>
								<option disabled value="checkbox">复选</option>
								<option disabled value="ubb">UBB</option>
								<option disabled value="textarea">textarea</option>
								<option disabled value="fileupBic">文件上传</option>
								<option disabled value="recommend">推荐属性</option>
								<option disabled value="bind">绑定</option>
							</select>
							<label for="idstructure[id][search]">搜索</label><input type="checkbox" name="structure[id][search]" id="idstructure[id][search]" />
							<label for="idstructure[id][show]">,&nbsp;显示</label><input type="checkbox" checked name="structure[id][show]" id="idstructure[id][show]" value="1" />
							<span id="spandividid">
								<span style="color:#9c9c9c;font-size:12px;">这项一般不用改,用默认的就OK</span>

							</span>
						</td>
					</tr>

					<{section name=p loop=$fields}>
					<tr>
						<td height="30" width="8%" align="right" class="title"><{$fields[p].Field}>&nbsp;&nbsp;</td>
						<td width="92%" height="30" align="left" class="con">
							名称:<input type="text" name="structure[<{$fields[p].Field}>][COMMENT]" style="width:80px;" value="<{$fields[p].comment}>" />
							&nbsp;&nbsp;
							类型：<select name="structure[<{$fields[p].Field}>][ftype]" style="width:100px;" onChange="$('spandivid'+this.name.match(/\[([a-zA-Z0-9_]+)\]/)[1]).innerHTML=dataset(this);">
								<option value=""></option>
								<option value="text">文本</option>
								<option value="md5str">密码</option>
								<option value="hide">隐藏域</option>
								<option value="select">静态下拉</option>
								<option value="dselect">动态下拉</option>
								<option value="radio">单选</option>
								<option value="checkbox">复选</option>
								<option value="ubb">UBB</option>
								<option value="textarea">textarea</option>
								<option value="fileupBic">文件上传</option>
								<option value="recommend">推荐属性</option>
								<option value="bind">绑定</option>
								<option value="my97">My97</option>
							</select>
							<label for="idstructure[<{$fields[p].Field}>][search]">搜索</label><input type="checkbox" name="structure[<{$fields[p].Field}>][search]" id="idstructure[<{$fields[p].Field}>][search]" />
							<label for="idstructure[<{$fields[p].Field}>][show]">,&nbsp;显示</label><input type="checkbox" name="structure[<{$fields[p].Field}>][show]" id="idstructure[<{$fields[p].Field}>][show]" />
							<span id="spandivid<{$fields[p].Field}>">

							</span>
						</td>
					</tr>
					<{/section}>
				</table>

			</fieldset>
			<input type="hidden" name="op" value="step2" />
			<input type="hidden" name="sortid" value="2" />
			<input type="submit" value="保存" />
		</form>
	</body>
</html>
